Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: onboarding ready condition and missing deps #4153

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

sshanzel
Copy link
Member

@sshanzel sshanzel commented Feb 5, 2025

Changes

  • Fixes the isOnboardingReady evaluation.
  • Fixes the issue introduced by updating the props.
  • Updated the deps cycle.
  • Tested each login flows.

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Preview domain

https://revert-revert-condition.preview.app.daily.dev

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Feb 6, 2025 9:39am
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Feb 6, 2025 9:39am

@sshanzel sshanzel changed the title Revert revert condition fix: onboarding ready condition and missing deps Feb 5, 2025
@@ -33,7 +33,7 @@ export const useOnboarding = (): UseOnboarding => {

return {
shouldShowAuthBanner,
isOnboardingReady: isActionsFetched && isAuthReady,
isOnboardingReady: isAuthReady && (isActionsFetched || !user),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the issue here I missed it maybe?

Copy link
Member Author

@sshanzel sshanzel Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an edge case where the loading state is there endlessly. One of the conditions is whether the returned value here is not yet true. The loading never stop since anonymous user would not have actions hence not yet fetched.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of that, the event listeners are not rendered which is needed to process the callback page messages on login/sign up.

@sshanzel sshanzel requested a review from rebelchris February 6, 2025 08:03
Copy link
Contributor

@AmarTrebinjac AmarTrebinjac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Had one question, but not blocking :)

Remember to do critical flow testing when publishing live

@@ -150,7 +150,6 @@ const seo: NextSeoProps = {
};

export function OnboardPage(): ReactElement {
const params = new URLSearchParams(window.location.search);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why move it and re-define it multiple places? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that it won't have to be a dependency on the memoized functions. Because if so, we will have to memoize this too since every render would create the object search param.

Also, they are used within those functions and not dependent on anything.

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but this def needs critical flow testing please 🙏

@sshanzel sshanzel merged commit f8ead14 into main Feb 6, 2025
10 checks passed
@sshanzel sshanzel deleted the revert-revert-condition branch February 6, 2025 12:00
@sshanzel
Copy link
Member Author

sshanzel commented Feb 6, 2025

Tested the critical flows and worked as intended 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants